ToU: navigation panel component#1140
Draft
deer-wmde wants to merge 2 commits into
Draft
Conversation
|
Deployment previews on netlify for branch
|
rosalieper
reviewed
Jun 16, 2026
tarrow
reviewed
Jun 17, 2026
| }, | ||
| methods: { | ||
| isCurrentPage (routeName) { | ||
| return this.$route.name === routeName |
Contributor
There was a problem hiding this comment.
I think I'd rather we also pass in the current link as a prop to this component rather than have it magically determined it by the route name.
While we just have two hardcoded routes this works but once we are getting the policy list over the wire I don't think we'll be able to rely on the route name. We'll need to look at the params of the route and I think at that point it's probably cleaner for the caller of this component to specify which is the current page.
To try and give an example I think we will need to handle:
- current
- upcoming
- 2029-01-01
- 2022-01-01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
WIP - current changes on routes and ToU pages themselves are only to get the right structure that gets currently build in #1130
once that PR is approved we can merge/rebase it into this one
that means interesting changes in here are currently only regarding the navigation panel
I went for a generic component, wrapped in a "Terms of Use" specific one, which can just be included on any of the ToU pages.
Another approach could be to store the link array in a plain js module and pass it on as a prop to the generic navigation panel component, but this current approach felt more "vue" to me. I am very interested to hear what the team prefers; there are probably more sensible ways i did not think of.
https://phabricator.wikimedia.org/T407632